package com.tripcube.ai.model.dto;

import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.tripcube.ai.serializer.EmptyStringToNullDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class CategorySelectDTO {

    @Schema(description = "类目名称")
    private String categoryName;

    @Schema(description = "类目类型", allowableValues = {"UNSTRUCTURED"}, defaultValue = "UNSTRUCTURED")
    @NotBlank(message = "类目类型不能为空")
    @JsonDeserialize(using = EmptyStringToNullDeserializer.class)
    @JsonSetter(nulls = Nulls.SKIP)
    private String categoryType = "UNSTRUCTURED";

    @Schema(description = "父类目ID")
    private String parentCategoryId;

    /**
     * 取值为上一次 API 调用返回的 NextToken 参数值
     */
    @Schema(description = "查询凭证Token")
    private String nextToken;

    @Schema(description = "分页查询时每页类目数量")
    private int maxResults;
}
